<template>
  <div style="background-color: white;height:100%;width:100%;overflow:hidden;">
    <div class="warp">
      <img style="height:100%;width:100%;" src="@/assets/img/bg_blue.png" class="login-logo" />
    </div>
    <div class="login-head">
      <!-- <img src="@/assets/img/logo.png" class="login-head-logo" />
      <img src="@/assets/img/slogan.png" class="login-head-slogan" /> -->
      <img src="@/assets/img/logo_blue.png" class="logo_blue"/>
    </div>
    <div class="login-body">
      <div>
        <span class="fixed-text">用户名</span>
      </div>
      <div class="login-input">
        <!-- <img src="@/assets/img/user.png" class="login-svg" /> -->
        <input style="background:transparent" placeholder="请输入账号" v-model="username" />
        <vux-icon type="clear" v-if="username" @click.native="username=''" class="login-clear"></vux-icon>
      </div>
      <div>
        <span class="fixed-text">密码</span>
      </div>
      <div class="login-input">
        <!-- <img  src="@/assets/img/password .png" class="login-svg" /> -->
        <input
          style="background:transparent"
          placeholder="请输入密码"
          v-model="password"
          type="password"
        />
        <vux-icon type="clear" v-if="password" @click.native="password=''" class="login-clear"></vux-icon>
      </div>
      <div class="login-checkbox-div">
        <div class="login-checkbox">
          <check-icon @click="rname = !rname" :value.sync="rname" type="plain" size="16"></check-icon>记住账号与密码
        </div>
        <div class="login-checkbox" @click="forgetPwd">
          <!-- <img src="@/assets/img/question-circle-fill.png" alt="" style="height:18px;width:18px;vertical-align:middle;"> -->
          <p style="display:inline-block;line-height:32px;margin-left:5px;color: #262A34;font-size: 13px;font-family: PingFang SC;font-weight: 400;">忘记密码？</p>
        </div>
      </div>
       <div @click="login" class="login-button">
        <!-- <img src="@/assets/img/Button@2x.png" alt=""> -->
        <button class="login">登录</button>
      </div>
    </div>
    <!-- <div @click="login" class="login-button"><img src="@/assets/img/Button@2x.png" alt=""></div> -->
  </div>
</template>

<script>
import { Icon, CheckIcon, cookie, AlertModule } from "vux";
import { signMD5 } from "@/assets/js/utils.js";
// import { JSEncrypt } from '../assets/js/jsencrypt.js';
import md5 from "js-md5";
var $vue = {};
export default {
  name: "login",
  beforeCreate(){
    $vue = this;
  },
  mounted() {
    this.rname = localStorage.getItem("rname") || false;
    this.rps = localStorage.getItem("rps") || false;
    this.rname = this.rname === "true" ? true : false;
    this.rps = this.rps === "true" ? true : false;
    if (this.rname) {
      this.username = localStorage.getItem("username");
      this.password = localStorage.getItem("password");
    }
  },
  data() {
    return {
      username: "",
      password: "",
      rname: false,
      rps: false,
      AESEncryption: "",
      AESKey: "",
      pubkey: "",
      projectId: "",
      projectName: "",
      encrypedPwd: "",
      userInfo: {
        userInfo: {
          userName: "",
          userId: "",
          ssoValueId: "",
          prjDeptName: "",
          prjDeptId: "",
          orgName: "",
          orgId: "",
          mobil: "",
          USER_NO: "",
          ADUSER_NAME: ""
        }
      },
      countNum: 0
    };
  },
  methods: {
    forgetPwd() {
      AlertModule.show({
        // title: "忘记密码请联系管理员",
        // content:
        //   '<div style="width: 130px; margin: auto;">' +
        //   '<div style="text-align: left;margin-bottom: 6px"><span style="color: #1691E0;font-size: 9px">电话：13123456789</span></div>' +
        //   '<div style="text-align: left;"><span  style="color: #1691E0;font-size: 10px">邮箱：147777777@qq.com</span></div>' +
        //   "</div>"
        content:
          '<div style="width: 130px; margin: auto;">' +
          '<div style="text-align: left;margin-bottom: 6px"><span style="color: #1691E0;font-size: 13px">忘记密码请联系管理员</span></div>' +
          "</div>"
      });
    },
    getToken(username,password){
      let params = {  
	      username,  
	      password,  
	      source:'mobile'
      };
      // let query = {
      //   method : 'post',
      //   url : this.TOKEN_URL,
      //   params
      // };
      this.$ajax({
        url : this.TOKEN_URL,
        method:"get",
        params:params
      }).then(res=>{
        console.log("token111",res);
        window.localStorage.setItem("token",res.data.msg);
      })

    },
    login() {
      if (!this.username) {
        this.$vux.toast.show({
          type: "text",
          text: "请输入账号",
          position: "middle"
        });
        return false;
      }

      if (!this.password) {
        this.$vux.toast.show({
          type: "text",
          text: "请输入密码",
          position: "middle"
        });
        return false;
      }
      if(this.checkNetWork()) {
        this.$store.commit("updateLoadingStatus", true);
        //获取pubkey
        this.$ajax({
          method: "get",
          url: this.LOGIN_URL,
          headers:{'Access-Control-Allow-Origin':'*'},
          //withCredentials : true,
          params: { action: "getPubkey" }
        }).then(res => {
          // debugger;
          //createPubKey(res.data);
          this.AESEncryption = res.data.AESEncryption;
          this.pubkey = res.data.pubkey;
          let encrypt = new JSEncrypt();
          encrypt.setPublicKey(res.data.pubkey);
          const encrypedPwd = encrypt.encrypt(this.password);
          this.getToken(this.username,this.password);
          this.$ajax({
            url: this.LOGIN_URL,
            method: "get",
            headers:{'Access-Control-Allow-Origin':'*'},
            // withCredentials : true,
            params: {
              action: "tologin",
              login: true,
              username: this.username,
              password: this.password,
              saveInfo: true,
              projectId: "0",
              projectName: "",
              projectType: "ID",
              InitLoginPage: "CloudLogin.html"
              //password:'',
              //password2:this.password,
              // SMSVerifyCode : "",
              // projectId : this.projectId,
              // projectName : this.projectName
            }
          }).then(respon => {
            this.$store.commit("updateLoadingStatus", false);
            if (respon.data.login) {
              //查询部门信息
              this.$store.dispatch("getDept", { id: 0, vm: this });
              //获取红点数
              this.$store.dispatch("getBadge", { vm: this });
              localStorage.setItem("rname", this.rname);
              localStorage.setItem("rps", this.rps);
              localStorage.setItem("username", this.username);
              localStorage.setItem("password", this.password);
              var vTime = new Date();
              var year = vTime.getFullYear();
              var month = vTime.getMonth() + 1;
              if (month <= 9) {
                month = "0" + month;
              }
              var date = vTime.getDate();
              if (date <= 9) {
                date = "0" + date;
              }
              var hour = vTime.getHours();
              if (hour <= 9) {
                hour = "0" + hour;
              }
              var minutes = vTime.getMinutes();
              if (minutes <= 9) {
                minutes = "0" + minutes;
              }
              var seconds = vTime.getSeconds();
              if (seconds <= 9) {
                seconds = "0" + seconds;
              }
              var noticeTime =
                year +
                "-" +
                month +
                "-" +
                date +
                " " +
                hour +
                ":" +
                minutes +
                ":" +
                seconds;
              localStorage.setItem("noticeTime", noticeTime);
              this.$router.push("/index/" + localStorage.getItem("projectId"));
            } else {
              this.$vux.toast.show({
                type: "text",
                text: '请求错误',
                position: "middle"
              });
              return false;
            }
            if (this.AESEncryption === true || this.AESEncryption === "true") {
              this.createAESkey();
              cookie.set("AESKey", this.AESKey, { expires: 30, path: "/" });
              cookie.set("AESEncryption", true, { expires: 30, path: "/" });
              cookie.set("pubkey", this.pubkey, { expires: 30, path: "/" });
            } else {
              cookie.set("AESKey", "", { expires: 30, path: "/" });
              cookie.set("AESEncryption", false, { expires: 30, path: "/" });
            }
            this.getUserItem();
            // this.get_mxtablesTitle()
            // StatusBar.backgroundColorByHexString("#FF1E82D2");
            // this.$router.push('/index/104244')
          });
        });
      } else {
        //执行离线状态时的任务

        this.$store.state.SQLiteDB.transaction(tx => {
          tx.executeSql(
            'SELECT * FROM FIX_USERINFO WHERE USER_NAME = "' + this.username + '" AND PASSWORD = "' +md5(this.password) +'"',
            [],
            (tx, result) => {
              console.log(result);
              if (result.rows.length > 0) {
                  console.log("length>0?");
                  this.userInfo.userInfo.userName = this.username;
                  this.userInfo.userInfo.USER_NO = this.username;
                  this.userInfo.userInfo.ssoValueId = this.username;
                  this.userInfo.userInfo.userId = result.rows.item(0).USER_ID;
                  this.userInfo.userInfo.ADUSER_NAME = result.rows.item(0).ADUSER_NAME;
                  //console.log("ceshi",this.userInfo)
                  this.getuserinfo();
                  this.$store.dispatch("getDept", { id: 0, vm: this });
                  this.getUserRight();
                } else {
                  this.$vux.toast.show({
                    type: "text",
                    text: "用户名或密码错误",
                    position: "middle"
                  });
                }
            }
          );
        });
      }
    },
    saveuserinfo() {
      this.$store.commit("SET_USER_INFO", this.userInfo);
    },
    getuserinfo() {
      this.$store.state.SQLiteDB.transaction(
        tx => {
          tx.executeSql(
            'SELECT * FROM PERBASEDATA WHERE USER_NAME = "' +this.username +'"',
            [],
            (tx, result) => {
              this.userInfo.userInfo.mobil = result.rows.item(0).TELEPHONE_CODE;
            }
          );
          tx.executeSql(
            'SELECT * FROM USERSELECTINFO WHERE USER_NAME = "' +
              this.username +
              '"and prjid="0"',
            [],
            (tx, result) => {
              this.userInfo.userInfo.orgName = result.rows.item(0).ORG_NAME;
              this.userInfo.userInfo.orgId = result.rows.item(0).ORG_ID;
            }
          );
          tx.executeSql(
            'SELECT * FROM SYS_PROJECTINFO  where projectId="0"',
            [],
            (tx, result) => {
              this.userInfo.userInfo.prjDeptName = result.rows.item(
                  0
                ).PRJDEPTNAME;
                this.userInfo.userInfo.prjDeptId = result.rows.item(
                  0
                ).PRJDEPTID;
            }
          );
        },
        err => {},
        success => {
          this.saveuserinfo();
        }
      );
    },
    getItem(data) {
      var tbn = "";
      tbn = "DC_M_HUZHU";
      //从缓存中获取调查表单所有的信息。
      var allConf = data.returnValue;
      if (tbn.indexOf("DC_") == 0 && tbn.indexOf("_SS") == tbn.length - 3) {
        //如果是实施表 则修改为实施表名
        for (var str in allConf.alltableconf) {
          allConf.alltableconf[str].TABLENAME += "_SS";
        }
        for (var str in allConf.dcxmldpz) {
          allConf.dcxmldpz[str].TABLENAME += "_SS";
        }
        for (var str in allConf.ptdetail) {
          allConf.ptdetail[str].TABLENAME += "_SS";
          allConf.ptdetail[str].TB += "_SS";
        }
      }
      /**
       * 根据主表获取所有的从表。
       * 循环判断 每条数据的主表 是否 等于 变量tbn，如果不等于则在数组中删除改数据。
       */
      for (var i = allConf.ptdetail.length - 1; i >= 0; i--) {
        if (allConf.ptdetail[i].TB != tbn) {
          //删除不是该主表下的数据
          allConf.ptdetail.splice(i, 1);
        }
      }

      /**
       * 如果用户传入自定义表单，则循环判断 每条从表是否在 data数组中，
       * 如果不在data数据中，则删除此条数据。
       */
      // if(data.length != 0){
      //   for(var i=allConf.ptdetail.length-1;i>=0;i--){
      //     // if($.inArray(allConf.ptdetail[i].TABLENAME,data) == -1){
      //     //   //删除不是用户传入的自定义表单数据
      //     //   allConf.ptdetail.splice(i,1);
      //     // }
      //     if (data.indexOf(allConf.ptdetail[i].TABLENAME) == -1){
      //       //删除不是用户传入的自定义表单数据
      //       allConf.ptdetail.splice(i,1);
      //     }
      //   }
      // }

      //将处理完的allConf数据 赋值给CF.allconfig
      let CF = {};
      CF.allconfig = allConf;
      CF.tableconfig = {};
      CF.QYFields = {};
      for (var i = 0; CF.allconfig.alltableconf.length > i; i++) {
        if (
          CF.tableconfig[CF.allconfig.alltableconf[i].TABLENAME] == undefined
        ) {
          CF.tableconfig[CF.allconfig.alltableconf[i].TABLENAME] = [];
        }
        CF.tableconfig[CF.allconfig.alltableconf[i].TABLENAME].push(
          CF.allconfig.alltableconf[i]
        );
      }

      // 用于字段启用不启用
      var QYField = CF.allconfig.dcxmldpz;
      if (QYField != "" && QYField != null && QYField != undefined) {
        for (var i = 0; QYField.length > i; i++) {
          var QYFC = QYField[i];
          if (CF.QYFields[QYFC.TABLENAME] == undefined) {
            CF.QYFields[QYFC.TABLENAME] = {};
          }
          CF.QYFields[QYFC.TABLENAME][QYFC.DCXM] = QYFC.QYZD;
        }
      }
    },
    get_mxtablesTitle() {
      this.$ajax({
        method: "get",
        url: this.actionUrl,
        withCredentials: true,
        params: { _method: "SYS_ZDXXB.getconfig" } //this.signMD5({_method : 'SYS_ZDXXB.getconfig'}),
      }).then(res => {
        //TODO 这个方法是什么作用，sxdtpm没有
        this.getItem(res.data);
        let CF = {};
        CF.tableconfig = {};
        CF.allconfig = res.data.returnValue;
        for (let i = 0; CF.allconfig.alltableconf.length > i; i++) {
          if (
            CF.tableconfig[CF.allconfig.alltableconf[i].TABLENAME] == undefined
          ) {
            CF.tableconfig[CF.allconfig.alltableconf[i].TABLENAME] = [];
          }
          CF.tableconfig[CF.allconfig.alltableconf[i].TABLENAME].push(
            CF.allconfig.alltableconf[i]
          );
        }
        let table_title = {};
        for (let item in CF.tableconfig) {
          if (table_title[item] === undefined) {
            table_title[item] = {};
          }
          for (let i = 0; i < CF.tableconfig[item].length; i++) {
            if (
              table_title[item][CF.tableconfig[item][i].FIELDNAME] === undefined
            ) {
              table_title[item][CF.tableconfig[item][i].FIELDNAME] =
                CF.tableconfig[item][i];
            }
          }
        }
        localStorage.setItem("allconfig", JSON.stringify(CF.allconfig));
        localStorage.setItem("table_title", JSON.stringify(table_title));
        // console.log(table_title)
      });
    },
    //获取当前登录用户信息
    getUserItem() {
      this.$ajax({
        // url : '/sxdtpm/servlet/Action.cmd',
        url: this.COMMON_URL,
        method: "post",
        withCredentials: true,
        cache: true,
        data: { _method: "systemService.getUserItems" } //signMD5({_method:"systemService.getUserItems"})
      }).then(res => {
        //todo
        console.log("ssssssss", res.data);
        this.$store.commit("SET_USER_INFO", res.data);
        //console.log(this.$store.state.user);
        this.$store.dispatch("getSystemCount", {
          vm: this,
          item: this.$store.state.user
        });
        this.getUserRight();
        // this.$store.commit("SET_USER_INFO", res.data);
        // debugger
        // console.log(res)
        // if (this.$store.state.projInfo.PROJECTID){
        //   this.$router.push('/index/home');
        // } else {
        //   this.$router.push({name: 'projectList'});
        // }
      });
    },
    //获取当前登录用户权限
    getUserRight() {
      if (this.checkNetWork()) {
        let paramsMD5 =
          '{"_method":"HOME_FIX_PERMISSION_MENU.getUserRight","userName":' +
          this.$store.state.user.USER_NO +
          "}";
        this.$ajax({
          methods: "post",
          url: this.COMMON_URL,
          // params: params,
          // params: this.signMD5({ FixJSON: paramsMD5 }),
          params: { FixJSON: paramsMD5 },
          async: false
        }).then(res => {
          console.log("权限login", res);
          let right = res.data.data;
          this.getRightDetail(right);
        });
      } else {
        var rightArr = [];
        this.$store.state.SQLiteDB.transaction(tx => {
          tx.executeSql(
            'SELECT APPID,APPNAME,PROJECTID FROM PRJMOBILEAPP_R_M_CONFIG WHERE ROLEID IN (SELECT ROLEID FROM Role_PrjRoleUser WHERE USER_NAME = "' +
              this.$store.state.user.USER_NO +
              '") and PROJECTID IN (SELECT PROJECTID FROM Role_PrjRoleUser WHERE USER_NAME = "' +
              this.$store.state.user.USER_NO +
              '")',
            [],
            (tx, result) => {
              console.log("**************************",result);
              rightArr = result.rows;
              $vue.getPMID(rightArr);
            }
          );
        });
      }
    },
    //获取权限项目部id
      getPMID(rightArr) {
      var finalArr = [];
      for (let i = 0; i < rightArr.length; i++) {
        $vue.$store.state.SQLiteDB.transaction(
            tx => {
              tx.executeSql(
                'SELECT PMID FROM SYS_PROJECTINFO s, PMBASE_PRJMANAG_DETAIL d, PMBASE_PRJMANAG p WHERE s.PROJECTID = d.PROJECTID AND d.RELATEID = p.GUID AND s.PROJECTID = "' +
                  rightArr.item(i).PROJECTID +
                  '"',
                [],
                (tx, result1) => {
                  var data = rightArr.item(i);
                  console.log("########", result1);
                  if (result1.rows.length > 0) {
                    data["PMID"] = result1.rows.item(0).PMID;
                  } else {
                    data["PMID"] = "";
                  }
                  finalArr[i] = data;
                }
              );
            },
            err => {},
            success => {
              if (i == rightArr.length - 1) {
                $vue.getRightDetail(finalArr);
              }
            }
          );
      }
    },
    //用户权限明细
    getRightDetail(right) {
      console.log("dsjahdjahweq", right);
      if (right.map(item => item.APPNAME).indexOf("安全检查") != -1) {
        this.countNum++;
      }
      if (right.map(item => item.APPNAME).indexOf("质量检查") != -1) {
        this.countNum++;
      }
      if (right.map(item => item.APPNAME).indexOf("日常巡检") != -1) {
        this.countNum++;
      }
      if (this.countNum == 1) {
        // this.column = 3;
        this.$store.commit("setColnum", 3);
      } else {
        // this.column = 4;
        this.$store.commit("setColnum", 4);
      }
      var arr = [];
      var qualityArr = [];
      var dailyArr = [];
      if (right.length > 0) {
        for (var i = 0; i < right.length; i++) {
          if (right[i].APPNAME == "安全检查" && right[i].PMID == "") {
            //不属于项目部
            arr.push(right[i].PROJECTID);
          } else if (
            right[i].APPNAME == "安全检查" &&
            right[i].PMID != "" &&
            right[i].PMID != undefined
          ) {
            //有项目部id，属于项目部
            arr.push(right[i].PROJECTID);
            arr.push(right[i].PMID);
          } else {
            continue;
          }
        }
        for (var i = 0; i < right.length; i++) {
          if (right[i].APPNAME == "质量检查" && right[i].PMID == "") {
            qualityArr.push(right[i].PROJECTID);
          } else if (
            right[i].APPNAME == "质量检查" &&
            right[i].PMID != "" &&
            right[i].PMID != undefined
          ) {
            qualityArr.push(right[i].PROJECTID);
            qualityArr.push(right[i].PMID);
          } else {
            continue;
          }
        }
        for (var i = 0; i < right.length; i++) {
          if (right[i].APPNAME == "日常巡检" && right[i].PMID == "") {
            dailyArr.push(right[i].PROJECTID);
          } else if (
            right[i].APPNAME == "日常巡检" &&
            right[i].PMID != "" &&
            right[i].PMID != undefined
          ) {
            dailyArr.push(right[i].PROJECTID);
            dailyArr.push(right[i].PMID);
          } else {
            continue;
          }
        }
        for (var i = 0; i < right.length; i++) {
          if (right[i].APPNAME == "项目") {
            this.$store.commit("setProjectFlag", true);
            break;
          } else {
            continue;
          }
        }

        //数组去重
        arr = Array.from(new Set([...arr]));
        qualityArr = Array.from(new Set([...qualityArr]));
        dailyArr = Array.from(new Set([...dailyArr]));
        this.$store.commit("setDangerArr", arr);
        this.$store.commit("setDailyArr", dailyArr);
        this.$store.commit("setQualityArr", qualityArr);
        
        for (var i = 0; i < right.length; i++) {
          if (right[i].APPNAME == "安全检查") {
            // var temp = {};
            // temp.label = "安全检查";
            // temp.img = require("../assets/img/securityCheck.png");
            // temp.src = "/hidangereport";
            // this.imgList.push(temp);
            this.$store.commit("setDangerFlag", true);
            console.log("登录1",this.$store.state.dangerFlag)
            break;
          } else {
            continue;
          }
        }
        for (var i = 0; i < right.length; i++) {
          if (right[i].APPNAME == "质量检查") {
            // var temp = {};
            // temp.label = "质量检查";
            // temp.img = require("../assets/img/qualityCheck.png");
            // temp.src = "/qualityReport";
            // this.imgList.push(temp);
            this.$store.commit("setQualityFlag", true);
            console.log("登录2",this.$store.state.qualityFlag)
            break;
          } else {
            continue;
          }
        }
        for (var i = 0; i < right.length; i++) {
          if (right[i].APPNAME == "日常巡检") {
            // var temp = {};
            // temp.label = "日常巡检";
            // temp.img = require("../assets/img/safetyMonitoring.png");
            // temp.src = "/dailyCheck";
            // this.imgList.push(temp);
            this.$store.commit("setDailyCheckFlag", true);
            console.log("登录3",this.$store.state.dailyCheckFlag)
            break;
          } else {
            continue;
          }
        }

        for (var i = 0; i < right.length; i++) {
          if (right[i].APPNAME == "参建信息") {
            this.$store.commit("setConstructionInfoFlag", true);
            break;
          } else {
            continue;
          }
        }
        for (var i = 0; i < right.length; i++) {
          if (right[i].APPNAME == "安全统计") {
            this.$store.commit("setSafetyStatisticsFlag", true);
            break;
          } else {
            continue;
          }
        }
      }
       this.$router.push("/index/home");
    },
    createAESkey() {
      let str = "";
      let range = 16;
      let arr = [
        "0",
        "1",
        "2",
        "3",
        "4",
        "5",
        "6",
        "7",
        "8",
        "9",
        "a",
        "b",
        "c",
        "d",
        "e",
        "f",
        "g",
        "h",
        "i",
        "j",
        "k",
        "l",
        "m",
        "n",
        "o",
        "p",
        "q",
        "r",
        "s",
        "t",
        "u",
        "v",
        "w",
        "x",
        "y",
        "z",
        "A",
        "B",
        "C",
        "D",
        "E",
        "F",
        "G",
        "H",
        "I",
        "J",
        "K",
        "L",
        "M",
        "N",
        "O",
        "P",
        "Q",
        "R",
        "S",
        "T",
        "U",
        "V",
        "W",
        "X",
        "Y",
        "Z"
      ];
      for (var i = 0; i < range; i++) {
        let pos = Math.round(Math.random() * (arr.length - 1));
        str += arr[pos];
      }
      this.AESKey = str;
    }
  },
  components: {
    "vux-icon": Icon,
    CheckIcon
  }
};
</script>

<style>
.warp {
  position: fixed;
  height: 100%;
  width: 100%;
}
.login-head {
  display: flex;
  position: relative;
  background: transparent;
  height: 25.8%;
  justify-content: flex-end;
  flex-direction: column;
  align-items: center;
}
.login-body {
  padding: 25px 48px;
  position:relative;
  background:#ffffff;
  margin:20px 15px
}
.login-body input {
  color: #000000;
  border: none;
  outline: none;
  font-size: 0.9rem;
  flex: 1;
  width: 0;
  background: transparent;
  position: relative;
}
.login-body input::-ms-input-placeholder {
  color: #9eaabe;
}
.login-body input::-moz-input-placeholder {
  color: #9eaabe;
}
.login-body input::-webkit-input-placeholder {
  color: #9eaabe;
}
.login-logo {
  width: 2rem;
}
.login-title {
  width: 17rem;
  margin-top: 1rem;
  padding-bottom: 30px;
  /* font-size: 1.5rem; */
  color: #fff;
  /* font-weight: 600; */
  text-shadow: 6px 0 4px rgba(0, 0, 0, 0.05);
}
.login-button {
  width: 100%;
  /* position:fixed; */
  position: relative;
  margin-top: 10px;
}
.login-button > img {
  margin: auto;
  width: 100%;
}
.login {
  width: 100%;
  height: 50px;
  background: #4d86ff;
  opacity: 0.9;
  border-radius: 4px;
  color: #ffffff;
  font-size: 16px;
  border: none;
}
.login-svg {
  width: 1rem;
  height: 1rem;
  vertical-align: middle;
  margin-right: 1rem;
}
.login-input {
  border-bottom: 1px solid #999999;
  padding: 10px 0;
  display: flex;
  margin-bottom: 20px;
}
.login-checkbox-div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 26px;
}
.login-checkbox {
  color: #b4b4b4;
  font-size: 0.8rem;
  line-height: 0.8rem;
  position: relative;
  margin-right: 15px;
}
/*修改vux组件的css样式*/
.login-checkbox /deep/ .vux-check-icon > .weui-icon-success-circle:before {
  color: #999999;
}
.checkbox-box {
  width: 0.8rem;
  height: 0.8rem;
  margin-right: 0.8rem;
  vertical-align: top;
}
.checkbox-checked {
  width: 0.8rem;
  height: 0.8rem;
  position: absolute;
  z-index: 100;
  left: 0;
}
.login-clear {
  line-height: 1rem;
}
.login-head-logo {
  width: 45px;
  height: 45px;
  position: absolute;
  top: 20%;
  left: 12%;
}
.login-head-slogan {
  width: 215px;
  height: 50px;
  position: absolute;
  top: 60%;
  left: 12%;
}
.login-head-title {
  width: 190px;
  height: 54px;
  margin-top: 18px;
}
.weui-dialog__title {
  font-size: 14px;
}
.weui-dialog__btn_primary {
  color: #1691e0;
}
.weui-icon-clear {
  opacity: 0.5;
}
.fixed-text {
  color: #ffffff;
  font-size: 12px;
}
.login-body input::placeholder {
  color: #999999;
}
.logo_blue{
    width: 100px;
    height: 100px;
}
</style>
